package org.java.order.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.java.order.entity.UserOrderDetail;

/**
 * @author WHQ
 * @version 1.0
 * @date 2022-3-17 0017 下午 3:55
 */
public interface UserOrderDetailMapper extends BaseMapper<UserOrderDetail> {
    /**
     * 订单详情表
     * @param tradeNum:订单id，可以重复
     * @param skuId:商品编号
     * @param num:商品的数量
     */
    @Insert("insert into orderDetail values(null,#{tradeNum},#{skuId},#{num})")
    public void insertOrderDetail(@Param("tradeNum") String tradeNum, @Param("skuId") Long skuId, @Param("num") Integer num);
}
